package repositorio;

import java.sql.Connection;
import java.sql.DriverManager;

public class ConnectionFactory {

	private static final String USERNAME = "root";
	private static final String PASSWORD = "";
	private static final String PORT = "3306";
	private static final String DATABASE = "diario_de_classe";
	private static final String URL = "jdbc:sqlite:C:/Users/Cleber/Desktop/workspace/DiarioDeClasse/base/mydatabase.sqlite";
	
	
	
	static {
		configureConnection();
	}
	

	public static Connection getConnection() {
		Connection con = null;
		try {
			con = DriverManager.getConnection(URL);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return con;
	}
	
	private static void configureConnection() {
		try {
			Class.forName("org.sqlite.JDBC");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	
}
